package com.qf.data.notify.entity;

import lombok.Data;
import lombok.experimental.Accessors;

import java.io.Serializable;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;

/**
 * author Ken
 * create_time 2022/11/16
 */
@Data
@Accessors(chain = true)
public class Email implements Serializable {
    //邮件标题
    private String subject;
    //来自于谁
    private String from;
    //发送给谁
    private List<String> tos = new ArrayList<>();
    //发送时间
    private Date sendTime;
    //发送的内容
    private String content;

    public Email addTo(String to){
        tos.add(to);
        return this;
    }
}
